package com.sxj.PDMS.mapper;

import com.sxj.PDMS.model.entity.YusRecordSheet;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 503c'j
* @description 针对表【yus_record_sheet(青年大学习记录表)】的数据库操作Mapper
* @createDate 2024-06-18 16:46:04
* @Entity com.sxj.PDMS.model.entity.YusRecordSheet
*/
public interface YusRecordSheetMapper extends BaseMapper<YusRecordSheet> {

    /**
     * 查询所有数据,分页展示
     *
     * @param start
     * @param pageSize
     * @return
     */
    @Select("select * from yus_record_sheet limit #{start},#{pageSize}")
    List<YusRecordSheet> selectAll(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

    @Select("select count(*) from yus_record_sheet")
    Long selectTotal();

    List<YusRecordSheet> selectByNameOrGradeOrStudentNumber(@Param("start") Integer start,
                                                            @Param("pageSize") Integer pageSize,
                                                            @Param("name") String name,
                                                            @Param("grade") String grade,
                                                            @Param("studentNumber") String studentNumber);

    Long selectTotalByNameOrGradeOrStudentNumber(@Param("name") String name,
                                                 @Param("grade") String grade,
                                                 @Param("studentNumber") String studentNumber);
}




